<?php
/**
 * ShopEx licence
 *
 * @copyright  Copyright (c) 2005-2010 ShopEx Technologies Inc. (http://www.shopex.cn)
 * @license  http://ecos.shopex.cn/ ShopEx License
 */

class b2c_finder_member_shenhe{

    public function __construct($app)
    {
        $this->column_uname = app::get('b2c')->_('公司名称');
        $this->column_email = app::get('b2c')->_('邮箱');
    }
  

    var $column_uname = 0;
    public function column_uname($row){
        $member_shenhe_model = app::get('b2c')->model('member_shenhe');
    	$member_info = $member_shenhe_model->getList('member_id',array('shenhe_id'=>$row['shenhe_id']));

        $member_model = app::get('b2c')->model('members');
    	$compname_info = $member_model->getList('name',array('member_id'=>$member_info[0]['member_id']));
        return $compname_info[0]['name'];
    }

    var $column_email_order = 2;
    public function column_email($row){
        $member_shenhe_model = app::get('b2c')->model('member_shenhe');
        $member_info = $member_shenhe_model->getRow('member_id',array('shenhe_id'=>$row['shenhe_id']));

        $member_model = app::get('b2c')->model('members');
        $compname_info = $member_model->getRow('email',array('member_id'=>$member_info['member_id']));
        return $compname_info['email'];
    }

}
